'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.createTable('Activations', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      activationCode: {
        type: Sequelize.STRING,
        comment: '激活码'
      },
      machineCode: {
        type: Sequelize.STRING,
        comment: '机器码'
      },
      activationVersion: {
        type: Sequelize.STRING,
        comment: '激活版本'
      },
      email: {
        type: Sequelize.STRING,
        comment: '邮箱'
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  async down(queryInterface, Sequelize) {
    await queryInterface.dropTable('Activations');
  }
};